﻿Imports ICtagControl.frmStartCompleteBase
Public Class clsDbInsitetest
    Public Function GetWeeklyCode() As DataTable

        Dim szSql As String = ""
        szSql &= "SELECT inkcode, lasercode "
        szSql &= "FROM [dbo].[weeklycode] "
        szSql &= "WHERE thedate = ( "
        szSql &= " SELECT CONVERT(CHAR(8), GETDATE(), 112) "
        szSql &= " ) "
        szSql &= "AND useconfirm = '1' "

        Dim dt As DataTable = itinfraDBacs.ExecuteSql(szSql, -1)

        If IsNothing(dt) Then
            GetWeeklyCode = New DataTable
        Else
            GetWeeklyCode = dt
        End If

    End Function

    Public Function GetRackArea(shape As String) As DataTable

        Dim szSql As String = ""
        szSql &= "SELECT Pkg, LowerLimit, UpperLimit "
        szSql &= "FROM [dbo].[RackArea] "
        szSql &= "WHERE Pkg = '" & shape & "'"

        Dim dt As DataTable = itinfraDBacs.ExecuteSql(szSql, -1)

        If IsNothing(dt) Then
            GetRackArea = New DataTable
        Else
            GetRackArea = dt
        End If

    End Function
End Class
